﻿<local:BaseWindow x:Class="PDFRider.WndDeletePages"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:PDFRider"
    xmlns:ltl="clr-namespace:LocTranslate;assembly=LocTranslateLibrary"
    Title="{ltl:Translate loc_wndDeletePagesTitle}" Height="175" Width="348" WindowStartupLocation="CenterOwner" 
    ShowInTaskbar="False" ResizeMode="NoResize" Style="{StaticResource GenericStyle}" WindowStyle="SingleBorderWindow" Icon="/PDFRider;component/PDFRider.ico">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{ltl:Translate loc_tbkPagesFrom}" Style="{StaticResource LabelTextBlock}" />
            <local:IntervalTextBox Style="{StaticResource IntervalTextBox}" SelectAllText="True"
                                   IsValidInterval="{Binding IsValidPageStart}"
                                   Text="{Binding PageStart, UpdateSourceTrigger=PropertyChanged}" />
            <TextBlock Text="{ltl:Translate loc_tbkPagesTo}" Margin="5" VerticalAlignment="Center" />
            <local:IntervalTextBox Style="{StaticResource IntervalTextBox}" SelectAllText="True"
                                   IsValidInterval="{Binding IsValidPageEnd}"
                                   Text="{Binding PageEnd, UpdateSourceTrigger=PropertyChanged}" />
            <TextBlock Text="{ltl:Translate loc_tbkPagesOf}" Margin="5" VerticalAlignment="Center" />
            <TextBlock Text="{Binding NumberOfPages}" Margin="5" VerticalAlignment="Center" />
            <TextBlock Text="{Binding NumberOfPhysicalPages, StringFormat=({0})}" Margin="5" VerticalAlignment="Center" />
        </StackPanel>

        <StackPanel Grid.Row="1" Visibility="Visible" >
            <TextBlock Style="{StaticResource InformationTextBlock}" Text="{Binding Information}" />
        </StackPanel>

        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5">
            <Button Content="{ltl:Translate loc_btnOK}" Command="{Binding CmdDelete}"
                    Style="{StaticResource StandardRectangleDialogButton}" IsDefault="True" />
            <Button Content="{ltl:Translate loc_btnCancel}" Command="{Binding CmdClose}"
                    Style="{StaticResource StandardRectangleDialogButton}" IsCancel="True"/>
        </StackPanel>

    </Grid>
</local:BaseWindow>
